clear all
cap log close
set more off

// Define subdirectory locations ----------
global code = "${proj}/code"
global data = "${proj}/data"
global est  = "${proj}/estimates"
global out  = "${proj}/output"
global temp = "${proj}/_temp"
global log  = "${proj}/logs"
// ---------------------------------------

* initialize log file -------------------
log using "${log}/05-extrap_hetero.log", text replace 

* run subprograms: extrapolation ---------------------
rscript using "${code}/extrap_hetero/01-history_q2.R", args("${proj}" "${rlib}")
rscript using "${code}/extrap_hetero/02-history_b5.R", args("${proj}" "${rlib}")
do "${code}/extrap_hetero/03-exper_data.do" 
rscript using "${code}/extrap_hetero/04-exper_q2.R", args("${proj}" "${rlib}")
rscript using "${code}/extrap_hetero/05-exper_b5.R", args("${proj}" "${rlib}")
do "${code}/extrap_hetero/06-exper_binscatter.do" 
rscript using "${code}/extrap_hetero/07-covar_q2.R", args("${proj}" "${rlib}")
do "${code}/extrap_hetero/08-output_history.do" 
do "${code}/extrap_hetero/09-output_exper.do" 
do "${code}/extrap_hetero/10-output_subgroups.do" 
do "${code}/extrap_hetero/11-output_covar.do"
* ----------------------------------------------------

* end log file --------------------------------
log close    




